<template>
    <div class="ant-layout-content">
        <div class="index_wrap__eMLzj"
            data-log="{&quot;oid&quot;:&quot;page_webpage_push_song_balance&quot;,&quot;isPage&quot;:true,&quot;events&quot;:[&quot;_pv&quot;,&quot;_pd&quot;],&quot;params&quot;:{}}">
            <div class="index_balanceWrap__n8-qy">
                <div class="index_title__kRAYo">我的余额</div>
                <div class="index_content__2-8Gb">
                    <div class="index_balance__9LxYd">
                        <div class="index_sum__HbPam">0.00</div>
                        <div class="index_detail__qle+g">包含现金<span class="index_num__frzSp">0.00</span>及赠款<span
                                class="index_num__frzSp">0</span></div>
                    </div><button type="button" class="ant-btn ant-btn-primary sc-aXZVg fEHaAe"><a
                            href="/st/ad-song/recharge">去充值</a></button>
                </div>
            </div>
            <div class="index_tableWrap__prslB">
                <div class="index_title__t7e97">账户明细</div>
                <div class="index_bar">
                    <div class="xz">
                        <el-select v-model="value" placeholder="Select" style="width: 120px">
                            <el-option v-for="item in options" :key="item.value" :label="item.label"
                                :value="item.value" />
                        </el-select>
                    </div>
                    <div class="rq">
                        <el-date-picker v-model="value1" type="daterange" range-separator="To"
                            start-placeholder="Start date" end-placeholder="End date" :size="size" />
                    </div>
                </div>
                <div class="bg"><el-table :data="tableData" style="width: 100%">
                        <el-table-column fixed prop="date" label="Date" width="150" />
                        <el-table-column prop="name" label="Name" width="120" />
                        <el-table-column prop="state" label="State" width="120" />
                        <el-table-column prop="city" label="City" width="120" />
                        <el-table-column prop="address" label="Address" width="600" />
                        <el-table-column prop="zip" label="Zip" width="120" />
                        <el-table-column fixed="right" label="Operations" min-width="120">
                            <template #default>
                                <el-button link type="primary" size="small" @click="handleClick">
                                    Detail
                                </el-button>
                                <el-button link type="primary" size="small">Edit</el-button>
                            </template>
                        </el-table-column>
                    </el-table></div>
            </div>
        </div>
        <el-affix position="bottom" :offset="250" class="right-affix">
            <div class="index_feedbackWrap__ODvDd">
                <div class="index_bar__PRbWW"><img
                        src="//p6.music.126.net/obj/wonDlsKUwrLClGjCm8Kx/45810308512/d428/8741/5907/225ff1a518706c83380d782b8abab3fa.jpg?imageView=1&amp;type=webp&amp;thumbnail=48x0"
                        style="width: 24px; height: 24px;">
                    <div class="index_text__4P5Vt">咨询反馈</div>
                </div>
                <div class="index_window__s0lmU" style="display: none;">
                    <div class="index_subText__FxbRY">更多问题请添加</div>
                    <div class="index_text__4P5Vt">云音乐专属顾问咨询</div><img
                        src="//p5.music.126.net/obj/wonDlsKUwrLClGjCm8Kx/59868833734/33d6/220c/eacd/85a5f227d12c52d4e416edd68c78ea05.png?imageView=1&amp;type=webp&amp;thumbnail=300x0"
                        style="width: 100px; height: 100px;">
                </div>
            </div>
        </el-affix>
    </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'
const handleClick = () => {
    console.log('click')
}

const tableData = [
    {
        date: '2016-05-03',
        name: 'Tom',
        state: 'California',
        city: 'Los Angeles',
        address: 'No. 189, Grove St, Los Angeles',
        zip: 'CA 90036',
        tag: 'Home',
    },
    {
        date: '2016-05-02',
        name: 'Tom',
        state: 'California',
        city: 'Los Angeles',
        address: 'No. 189, Grove St, Los Angeles',
        zip: 'CA 90036',
        tag: 'Office',
    },
    {
        date: '2016-05-04',
        name: 'Tom',
        state: 'California',
        city: 'Los Angeles',
        address: 'No. 189, Grove St, Los Angeles',
        zip: 'CA 90036',
        tag: 'Home',
    },
    {
        date: '2016-05-01',
        name: 'Tom',
        state: 'California',
        city: 'Los Angeles',
        address: 'No. 189, Grove St, Los Angeles',
        zip: 'CA 90036',
        tag: 'Office',
    },
]
const size = ref<'default' | 'large' | 'small'>('default')

const value1 = ref('')
const value2 = ref('')

const shortcuts = [
    {
        text: 'Last week',
        value: () => {
            const end = new Date()
            const start = new Date()
            start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
            return [start, end]
        },
    },
    {
        text: 'Last month',
        value: () => {
            const end = new Date()
            const start = new Date()
            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
            return [start, end]
        },
    },
    {
        text: 'Last 3 months',
        value: () => {
            const end = new Date()
            const start = new Date()
            start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
            return [start, end]
        },
    },
]
</script>

<style lang="scss" scoped>
.index_bar {
    display: flex;
    gap: 16px;
}

.right-affix {
    right: 0;
    /* 距离右侧20像素 */
    position: fixed;
    bottom: 20px;
    /* 与offset保持一致 */
    z-index: 100;
    /* 确保在其他元素上方 */
}

.index_feedbackWrap__ODvDd .index_bar__PRbWW {
    -ms-flex-align: center;
    align-items: center;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px 0 0 8px;
    border-right-width: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    height: 182px;
    padding-top: 37px;
    width: 50px;
    unicode-bidi: isolate;

    img {
        overflow-clip-margin: content-box;
        overflow: clip;
        border-style: none;
        vertical-align: middle;
        width: 24px;
        height: 24px;
    }

    .index_text__4P5Vt {
        color: #333;
        font-size: 16px;
        font-weight: 400;
        line-height: 120%;
        margin-top: 8px;
        width: 16px;
    }
}

.index_window__s0lmU {
    align-items: center;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-sizing: border-box;
    height: 182px;
    margin-right: 31px;
    padding-top: 18px;
    width: 206px;

    .index_subText__FxbRY {
        color: rgba(0, 0, 0, .4);
        font-size: 14px;
        font-weight: 500;
        line-height: 140%;
    }

    .index_text__4P5Vt {
        color: rgba(0, 0, 0, .8);
        font-size: 14px;
        font-weight: 500;
        line-height: 140%;
        margin-bottom: 8px;
    }

    img {
        border-style: none;
        vertical-align: middle;
    }
}

.ant-layout-content {
    min-width: 1440px;
    flex: auto;
    min-height: 0;
    box-sizing: border-box;

    .index_wrap__eMLzj {
        -ms-flex-align: center;
        align-items: center;
        background: #f5f5f5;
        box-sizing: border-box;
        display: -ms-flexbox;
        display: flex;
        -ms-flex-direction: column;
        flex-direction: column;
        min-height: 1295px;
        padding: 31px 56px 176px;
        width: 100%;

        .index_balanceWrap__n8-qy {
            background: #fff;
            border-radius: 10px;
            box-sizing: border-box;
            height: 201px;
            padding: 28px 40px 40px;
            width: 1328px;

            .index_title__kRAYo {
                color: #202a44;
                font-size: 24px;
                font-weight: 700;
                line-height: 130%;
            }

            .index_content__2-8Gb {
                -ms-flex-pack: justify;
                -ms-flex-align: center;
                align-items: center;
                display: -ms-flexbox;
                display: flex;
                justify-content: space-between;
                margin-top: 44px;

                .index_sum__HbPam {
                    color: #000;
                    font-size: 32px;
                    font-weight: 700;
                    line-height: 39px;
                }

                .index_detail__qle\+g {
                    color: rgba(0, 0, 0, .4);
                    font-size: 12px;
                    font-weight: 400;
                    line-height: 14px;
                    margin-top: 4px;
                    opacity: .9;

                    .index_num__frzSp {
                        padding: 0 4px;
                    }
                }
            }

            .ant-btn {
                background: #ff3a3a;
                border: none;
                border-radius: 20px;
                box-sizing: border-box;
                color: #fff;
                font-size: 16px;
                font-weight: 500;
                height: 40px;
                line-height: 24px;
                padding: 8px 40px;
                width: 128px;

                a {

                    background-color: transparent;
                    cursor: pointer;
                    outline: none;
                    text-decoration: none;
                    transition: color .3s;
                    color: #fff;
                }
            }
        }

        .index_tableWrap__prslB {
            background: #fff;
            border-radius: 10px;
            box-sizing: border-box;
            display: flex;
            -ms-flex-direction: column;
            flex-direction: column;
            gap: 24px;
            margin-top: 27px;
            padding: 40px 40px 24px;
            width: 1328px;

            .index_title__t7e97 {
                color: rgba(0, 0, 0, .8);
                font-size: 20px;
                font-weight: 600;
                line-height: 28px;
            }
        }
    }
}
</style>